Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Some model names (such as 'person') are pluralized incorrectly

#25

The plugin handles 'person' and some other irregular words incorrectly. For example,

script/generate authenticated person sessions

gives code like


map.signup '/signup', :controller => 'peoples', :action => 'new'

instead of


map.signup '/signup', :controller => 'people', :action => 'new'

(i.e., 'peoples' instead of 'people').

What's happening is that, implicitly, pluralize is being called twice on the model name, so the plugin fails for any name that doesn't satisfy the identity


name.pluralize.pluralize == name.pluralize

In the example, the problem is that 'person'.pluralize == 'people' but 'people'.pluralize == 'peoples'.

The culprit is in the call to inflect_names in authenticated_generator.rb. I've attached a patch with a fix; let me know if you'd prefer a GitHub pull request.

Reported by Michael Hartl · November 3rd, 2008 @ 06:09 PM

State: new
Milestone: none
Assigned to: mrflip mrflip

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.